<div class="dailyCheck main">
	<div class="query-info shadowbox">
		<div class="container-header">巡查记录</div>
		<form class="base-info pa-form-content"
			name="queryForm" novalidate>
			<div class="pa-form-control pa-form-control-inline">
			  <label>巡查名称：</label>
			  <input type="text" class="form-control-input"
			    ng-model="monthCheck.queryData.taskName">
			</div>
			<div class="pa-form-control pa-form-control-inline">
			  <label>巡查单位：</label>
			  <select name="checkUnit"
			  	ng-model="monthCheck.queryData.role">
			  	<option value=""></option>
			  	<option value="0">指挥部</option>
			  	<option value="1">总监办</option>
			  	<option value="2">项目部</option>
			  </select>
			</div>
			<div class="pa-form-control pa-form-control-inline">
			  <label>巡查状态：</label>
			  <select name="checkResult"
			  	ng-model="monthCheck.problemStatus">
			  	<option value=""></option>
			  	<option value="1">未完成</option>
			  	<option value="3">已完成</option>
			  </select>
			</div>
			<div class="pa-form-control pa-form-control-inline">
				<label>巡查时间：</label>
				<input type="text" class="form-control-input" ng-datepicker name="startTime"  
					ng-model="monthCheck.queryData.checkCompletedTimeFrom">
					到
				<input type="text" class="form-control-input" ng-datepicker name="endTime"
				  ng-model="monthCheck.queryData.checkCompletedTimeTo">
			</div>
		</form>
		<div class="btn-outer-right">			
			<a class="pa-btn"
				ng-click="monthCheck.query(queryForm)">
				<i class="fa fa-search"></i>
				<span class="ml5">查询</span>
			</a>
			<a class="pa-btn reset-btn"
				ng-click="monthCheck.reset()">
				<i class="fa fa-repeat"></i>
				<span class="ml5">重置</span>
			</a>		
		</div>
	</div>
	<!-- 巡查记录 -->
	<div class="pa-table-container shadowbox">
		<form class="base-info">
			<table class="pa-table">
				<thead>
					<tr>
						<th>巡查名称</th>
						<th>巡查地点</th>
						<th>巡查单位</th>
						<th>巡查分类</th>
						<th>巡查时长（分钟）</th>
						<th>内容数量</th>
						<th>巡查状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in monthCheck.dailyCheckList">
						<td>{{item.taskName}}</td>
						<td>{{item.bidName}}</td>
						<td>{{item.role == '0' ? '指挥部' : 
									item.role == '1' ? '总监办' :
									item.role == '2' ? '项目部' : ''}}</td>						
						<td class="daily-overflow">{{item.classifyNames}}</td>
						<td>{{item.checkPeriod}}</td>
						<td>{{item.contentNum}}</td>
						<td
							ng-class="{'has-complete': item.status == '3',
          		'nostart': item.status == '2'}">
          		{{item.status == '3' ? '已完成' : '未完成'}}
        		</td>
						<td class="check">
							<div class="del"
								authorization-btn="api/checkRecord/app/queryContentList"
								ng-click="monthCheck.showDetail(item.taskId)">
								<i class="fa fa-street-view color"></i>
								<span>查看内容</span>
							</div>
						</td>							
					</tr>
				</tbody>
			</table>
		</form>
		<div class="total-num">
		  共计<span class="total-num-colorful">
		  {{monthCheck.paginationData.total}}</span>条
		</div>
		<!-- 分页 -->
		<div class="pagination-outer">
      <uib-pagination
        total-items="monthCheck.paginationData.total"
        ng-model="monthCheck.paginationData.pageNum"
        items-per-page="monthCheck.paginationData.pageSize"
        ng-change="pageChange()"
        class="pagination-sm"
        boundary-link-numbers="true"
        max-size="5"
        next-text="下一页"
        previous-text="上一页"></uib-pagination>
		</div>
	</div>
	<!-- 内容 -->
	<div class="pa-table-container shadowbox" id="check_list"
		ng-show="monthCheck.showDetailList">		
		<div class="container-header" style="margin-left: -10px;margin-top: -13px;">巡查内容</div>
		<form class="base-info" style="margin-top: 20px;">
			<table class="pa-table">
				<thead>
					<tr>
						<th>内容编号</th>
						<th>巡查分类</th>
						<th>巡查结果</th>					
						<th class="time-sequence">
							<div>整改期限</div>
							<!-- <div class="time-sequence-btn">
							  <div class="time-sequence-box"
							    ng-click="monthCheck.up('problem_deadline','0')">
							    <i class="fa fa-caret-up"></i>
							  </div>
							  <div class="time-sequence-box"
							    ng-click="monthCheck.up('problem_deadline','1')">
							    <i class="fa fa-caret-down"></i>
							  </div> 
							</div> -->
						</th>
						<th>内容提交时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in monthCheck.dailyCheckDetailList">
						<td>{{item.contentNumber}}</td>
						<td>{{item.checkClassifyName}}</td>
						<td>{{item.problemStatus == '3' ? '符合要求' : '不符合要求'}}</td>
						<td>{{item.problemDeadline1}}</td>
						<td>{{item.problemFoundTime1}}</td>
						<td
							ng-class="{'nostart': item.problemStatus == '0',
												'ongoing': item.problemStatus == '1',
        								'has-complete': item.problemStatus == '2'}">
	            {{item.problemStatus == 3 ? '符合要求' : 
		            item.problemStatus == 2 ? '已完成' : 
		          	item.problemStatus == 1 ? '待审核' :
								item.problemStatus == 0 ? '待整改' : ''}}
						</td>	
						<td>
							<div class="del"
								authorization-btn="api/checkRecord/app/queryContentDetail"
								ng-click="monthCheck.checkDetail(item)">
								<i class="fa fa-street-view color"></i>
								<span>详情</span>
							</div>
						</td>							
					</tr>
				</tbody>
			</table>
		</form>
	</div>
</div>